package com.yongbao.model.dtomapper;

import com.yongbao.model.domain.RolePermissionDO;
import com.yongbao.model.request.RolePermissionRequest;
import com.yongbao.model.vo.RolePermissionVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface RolePermissionDtoMapper {

    RolePermissionDtoMapper INSTANCE = Mappers.getMapper(RolePermissionDtoMapper.class);

    /**
    * DO to VO
    * @param rolePermissionDO
    * @return
    */
    RolePermissionVO do2VO(RolePermissionDO rolePermissionDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    RolePermissionDO request2DO(RolePermissionRequest request);
}
